@extends('admin.public.admin')
@section('main')
<div class="mws-panel grid_8">
    <div class="mws-panel-header">
        <span>修改分类</span>
    </div>

    <div class="mws-panel-body no-padding">
        <form class="mws-form" action="/admin/types/{{$data['id']}}" method="post">
            {{ csrf_field() }}
            <input type="hidden" value="PUT" name="_method">
            <div class="mws-form-inline">
            
                 <div class="mws-form-row">
                    <label class="mws-form-label">父类名称</label>
                    <div class="mws-form-item">
                        <select class="small" name="pid" disabled>
                            <option value="0">--父级菜单--</option>
                                    <option value="{{$data['id']}}" selected >{{$data['typename']}}</option>
                        </select>

                    </div>
                </div>

                <div class="mws-form-row">
                    <label class="mws-form-label">分类名称</label>
                    <div class="mws-form-item">
                        <input type="text" class="small" name="typename" value="{{$data['typename']}}" readonly>
                    </div>
                </div>

                <div class="mws-form-row">
                    <label class="mws-form-label">分类标题</label>
                    <div class="mws-form-item">
                        <input type="text" class="small" name="title" value="{{$data['title']}}">
                    </div>
                </div>


                <div class="mws-form-row">
                    <label class="mws-form-label">关键字</label>
                    <div class="mws-form-item">
                        <input type="text" class="small" name="keywords" value="{{$data['keywords']}}">
                    </div>
                </div>
                
                <div class="mws-form-row">
                    <label class="mws-form-label">分类描述</label>
                    <div class="mws-form-item">
                        <textarea name="description" rows="10" cols="40" class="small" value="{{$data['description']}}">
                            
                        </textarea>
                    </div>
                </div>
                  
                @if($data['is_lou'])
                   <div class="mws-form-row">
                        <label class="mws-form-label">是否楼层</label>
                        <div class="mws-form-item clearfix">
                             <ul class="mws-form-list inline">
                                  <li><input type="radio" name="is_lou" value="1"  checked> <label>是</label></li>
                                  <li><input type="radio" name="is_lou" value="0"> <label>否</label></li>                                       
                             </ul>
                        </div>
                   </div>

                @else

                    <div class="mws-form-row">
                        <label class="mws-form-label">是否楼层</label>
                        <div class="mws-form-item clearfix">
                             <ul class="mws-form-list inline">
                                  <li><input type="radio" name="is_lou" value="1"  > <label>是</label></li>
                                  <li><input type="radio" name="is_lou" value="0" checked> <label>否</label></li>                                       
                             </ul>
                        </div>
                   </div>

                @endif
            </div>
            <div class="mws-button-row">
                <input type="submit" value="修改" class="btn btn-danger">
            </div>
        </form>
    </div>      
</div>
@endsection